package com.baor.controller;

import com.baor.domain.RoleVo;
import com.baor.service.RoleService;
import com.baor.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping(value = "role")
public class RoleController {
    @Autowired
    private RoleService roleService;
    @RequestMapping(value = "roleList")
    private R roleList(@RequestBody Map<String, Object> params) {
        return this.roleService.roleList(params);
    }

    @RequestMapping(value = "addRole")
    private R addRole(@RequestBody Map<String, Object> params) {
        return this.roleService.addRole(params);
    }

    @RequestMapping(value = "updateRole")
    private R updateRole(@RequestBody Map<String, Object> params) {

        return this.roleService.updateRole(params);
    }
}
